<!-- $Id: order_info.htm 17060 2010-03-25 03:44:42Z liuhui $ -->

{include file="pageheader.htm"}
{insert_scripts files="topbar.js,../js/utils.js,listtable.js,selectzone.js,../js/common.js"}
{if $user}
<div id="topbar">
  <div align="right"><a href="" onclick="closebar(); return false"><img src="images/close.gif" border="0" /></a></div>
  <table width="100%" border="0">
    <caption><strong> {$lang.buyer_info} </strong></caption>
    <tr>
      <td> {$lang.email} </td>
      <td> <a href="mailto:{$user.email}">{$user.email}</a> </td>
    </tr>
    <tr>
      <td> {$lang.user_money} </td>
      <td> {$user.formated_user_money} </td>
    </tr>
    <tr>
      <td> {$lang.pay_points} </td>
      <td> {$user.pay_points} </td>
    </tr>
    <tr>
      <td> {$lang.rank_points} </td>
      <td> {$user.rank_points} </td>
    </tr>
    <tr>
      <td> {$lang.rank_name} </td>
      <td> {$user.rank_name} </td>
    </tr>
    <tr>
      <td> {$lang.bonus_count} </td>
      <td> {$user.bonus_count} </td>
    </tr>
  </table>

  {foreach from=$address_list item=address}
  <table width="100%" border="0">
    <caption><strong> {$lang.consignee} : {$address.consignee|escape} </strong></caption>
    <tr>
      <td> {$lang.email} </td>
      <td> <a href="mailto:{$address.email}">{$address.email}</a> </td>
    </tr>
    <tr>
      <td> {$lang.address} </td>
      <td> {$address.address|escape} </td>
    </tr>
    <tr>
      <td> {$lang.zipcode} </td>
      <td> {$address.zipcode|escape} </td>
    </tr>
    <tr>
      <td> {$lang.tel} </td>
      <td> {$address.tel|escape} </td>
    </tr>
    <tr>
      <td> {$lang.mobile} </td>
      <td> {$address.mobile|escape} </td>
    </tr>
  </table>
  {/foreach}
</div>
{/if}

<form action="order.php?act=operate" method="post" name="theForm">
<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
  <tr>
    <td colspan="4">
      <div align="center">
        <input name="prev" type="button" class="button" onClick="location.href='order.php?act=info&order_id={$prev_id}';" value="{$lang.prev}" {if !$prev_id}disabled{/if} />
        <input name="next" type="button" class="button" onClick="location.href='order.php?act=info&order_id={$next_id}';" value="{$lang.next}" {if !$next_id}disabled{/if} />
        <input type="button" onclick="window.open('order.php?act=info&order_id={$order.order_id}&print=1')" class="button" value="{$lang.print_order}" />
    </div></td>
  </tr>
  <tr>
    <th colspan="4">{$lang.base_info}</th>
  </tr>
  <tr>
    <td width="18%"><div align="right"><strong>{$lang.label_order_sn}</strong></div></td>
    <td width="34%">{$order.order_sn}{if $order.extension_code eq "group_buy"}<a href="group_buy.php?act=edit&id={$order.extension_id}">{$lang.group_buy}</a>{elseif $order.extension_code eq "exchange_goods"}<a href="exchange_goods.php?act=edit&id={$order.extension_id}">{$lang.exchange_goods}</a>{/if}</td>
    <td width="15%"><div align="right"><strong>{$lang.label_order_status}</strong></div></td>
    <td>{$order.status}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_user_name}</strong></div></td>
    <td>{$order.user_name|default:$lang.anonymous} {if $order.user_id > 0}[ <a href="" onclick="staticbar();return false;">{$lang.display_buyer}</a> ] [ <a href="user_msg.php?act=add&order_id={$order.order_id}&user_id={$order.user_id}">{$lang.send_message}</a> ]{/if}</td>
    <td><div align="right"><strong>{$lang.label_order_time}</strong></div></td>
    <td>{$order.formated_add_time}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_payment}</strong></div></td>
    <td>{if $order.pay_id > 0}{$order.pay_name}{else}{$lang.require_field}{/if}<a href="order.php?act=edit&order_id={$order.order_id}&step=payment" class="special">{$lang.edit}</a>
    ({$lang.action_note}: <span onclick="listTable.edit(this, 'edit_pay_note', {$order.order_id})">{if $order.pay_note}{$order.pay_note}{else}N/A{/if}</span>)</td>
    <td><div align="right"><strong>{$lang.label_pay_time}</strong></div></td>
    <td>{$order.pay_time}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_shipping}</strong></div></td>
    <td>{if $exist_real_goods}{if $order.shipping_id > 0}<span id="shipping_name">{$order.shipping_name}</span>{else}{$lang.require_field}{/if}<a href="order.php?act=edit&order_id={$order.order_id}&step=shipping" class="special">{$lang.edit}</a>&nbsp;&nbsp;<input type="button" onclick="window.open('order.php?act=info&order_id={$order.order_id}&shipping_print=1')" class="button" value="{$lang.print_shipping}"> {if $order.insure_fee > 0}（{$lang.label_insure_fee}{$order.formated_insure_fee}）{/if}{/if}</td>
    <td><div align="right"><strong>{$lang.label_shipping_time}</strong></div></td>
    <td>{$order.shipping_time}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_invoice_no}</strong></div></td>
    <td>{if $order.shipping_id>0 and $order.shipping_status>0}<span>{if $order.invoice_no}<span id="invoice_no">{$order.invoice_no}</span>{else}N/A{/if}</span><a href="order.php?act=edit&order_id={$order.order_id}&step=shipping" class="special">{$lang.edit}</a>{/if}</td>
    <td><div align="right"><strong>{$lang.from_order}</strong></div></td>
    <td>{$order.referer}</td>
  </tr>
   <!--增值税发票_添加_START_www.68ecshop.com-->
  <!--普通发票显示内容-->
  <tr>
    <th colspan='4'>{$lang.inv_info}
    {if $order.inv_status eq 'provided'}
    <a href='javascript:void(0)' class='special' disabled='true' style='color:#ccc'>已开票</a>
    {else}
    <a href='order.php?act=edit&order_id={$order.order_id}&step=invoice&step_detail=edit' class='special'>{if $order.inv_type eq ''}{$lang.add}{else}{$lang.edit}{/if}</a>
    {/if}
    </th>
  </tr>
  {if $order.inv_type eq 'normal_invoice'}
  <tr>
    <td><div align="right"><strong>{$lang.label_inv_type}</strong></div></td>
    <td>{$lang[$order.inv_type]}</td>
    <td><div align='right'><strong>{$lang.label_inv_payee}</strong></div></td>
    <td>{$order.inv_payee}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_inv_content}</strong></div></td>
    <td>{$order.inv_content}</td>
    <td><div align="right"><strong>{$lang.label_inv_money}</strong></div></td>
    <td>{$order.formatted_inv_money}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_action_note2}</strong></div></td>
    <td colspan='2'>{$order.inv_remark}</td>
    <td>&nbsp</td>
  </tr>
  <!--增值税发票显示内容-->
  {elseif $order.inv_type eq 'vat_invoice'}
  <tr>
    <td><div align="right"><strong>{$lang.label_inv_type}</strong></div></td>
    <td>{$lang[$order.inv_type]}</td>
    <td><div align="right"><strong>{$lang.label_inv_content}</strong></div></td>
    <td>{$order.inv_content}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_inv_money}</strong></div></td>
    <td>{$order.formatted_inv_money}</td>
    <td><div align="right"><strong>{$lang.label_company_name1}</strong></div></td>
    <td>{$order.vat_inv_company_name}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_taxpayer_id}</strong></div></td>
    <td>{$order.vat_inv_taxpayer_id}</td>
    <td><div align="right"><strong>{$lang.label_registration_address}</strong></div></td>
    <td>{$order.vat_inv_registration_address}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_registration_phone}</strong></div></td>
    <td>{$order.vat_inv_registration_phone}</td>
    <td><div align="right"><strong>{$lang.label_deposit_bank}</strong></div></td>
    <td>{$order.vat_inv_deposit_bank}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_bank_account}</strong></div></td>
    <td>{$order.vat_inv_bank_account}</td>
    <td><div align="right"><strong>{$lang.label_inv_consignee_name}</strong></div></td>
    <td>{$order.inv_consignee_name}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_inv_consignee_phone}</strong></div></td>
    <td>{$order.inv_consignee_phone}</td>
    <td><div align="right"><strong>{$lang.label_inv_consignee_address}</strong></div></td>
    <td>{$order.inv_complete_address}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_action_note2}</strong></div></td>
    <td colspan='2'>{$order.inv_remark}</td>
    <td>&nbsp</td>
  </tr>
  {else}
  <tr>
    <td colspan='4'><div align="center" style='height:50px;line-height:50px;'><strong>没有发票信息</strong></div></td>
  </tr>
  {/if}
  <!--增值税发票_添加_END_www.68ecshop.com-->
  <!-- 代码增加_start   By www.ecshop68.com -->
  <tr>
  	<td><div align="right"><strong>{$lang.label_pickup_point}</strong></div></td>
    <td colspan="3">
    	{$lang.p_shop_name}{$pickup_point.shop_name}&nbsp;&nbsp;{$lang.p_contact}{$pickup_point.contact}&nbsp;&nbsp;
        {$lang.p_phone}{$pickup_point.phone}&nbsp;&nbsp;{$lang.p_address}{$pickup_point.address}
    </td>
  </tr>
  <!-- 代码增加_end   By www.ecshop68.com -->
  <tr>
    <th colspan="4">{$lang.other_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=other" class="special">{$lang.edit}</a></th>
    </tr>
 <!--增值税发票_删除_START_www.68ecshop.com-->
  <!--<tr>
    <td><div align="right"><strong>{$lang.label_inv_type}</strong></div></td>
    <td>{$order.inv_type}</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_inv_payee}</strong></div></td>
    <td>{$order.inv_payee}</td>
    <td><div align="right"><strong>{$lang.label_inv_content}</strong></div></td>
    <td>{$order.inv_content}</td>
  </tr>-->
  <!--增值税发票_删除_END_www.68ecshop.com-->
  <tr>
    <td><div align="right"><strong>{$lang.label_postscript}</strong></div></td>
    <td colspan="3">{$order.postscript}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_how_oos}</strong></div></td>
    <td>{$order.how_oos}</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <!--包装、贺卡、贺卡祝福语_删除_START_www.68ecshop.com-->
<!--   <tr>
    <td><div align="right"><strong>{$lang.label_pack}</strong></div></td>
    <td>{$order.pack_name}</td>
    <td><div align="right"><strong>{$lang.label_card}</strong></div></td>
    <td>{$order.card_name}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_card_message}</strong></div></td>
    <td colspan="3">{$order.card_message}</td>
  </tr> -->
  <!--包装、贺卡、贺卡祝福语_删除_END_www.68ecshop.com-->
  <tr>
    <td><div align="right"><strong>{$lang.label_to_buyer}</strong></div></td>
    <td colspan="3">{$order.to_buyer}</td>
  </tr>
  <tr>
    <th colspan="4">{$lang.consignee_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=consignee" class="special">{$lang.edit}</a></th>
    </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_consignee}</strong></div></td>
    <td>{$order.consignee|escape}</td>
    <td><div align="right"><strong>{$lang.label_email}</strong></div></td>
    <td>{$order.email}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_address}</strong></div></td>
    <td>[{$order.region}] {$order.address|escape}</td>
    <td><div align="right"><strong>{$lang.label_zipcode}</strong></div></td>
    <td>{$order.zipcode|escape}</td>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_tel}</strong></div></td>
    <td>{$order.tel}</td>
    <td><div align="right"><strong>{$lang.label_mobile}</strong></div></td>
    <td>{$order.mobile|escape}</td>
  </tr>
  <tr>
    <!--<td><div align="right"><strong>{$lang.label_sign_building}</strong></div></td>
    <td>{$order.sign_building|escape}</td>-->
    <td><div align="right"><strong>{$lang.label_best_time}</strong></div></td>
    <td colspan="3">{$order.best_time|escape}</td>
  </tr>
</table>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
  <tr>
    <th colspan="10" scope="col">{$lang.goods_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=goods" class="special">{$lang.edit}</a></th>
    </tr>
  <tr>
    <td scope="col" width="30%"><div align="center"><strong>{$lang.goods_name_brand}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.goods_shouhou}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.goods_sn}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.product_sn}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.goods_price}</strong></div></td>
	<td scope="col"><div align="center"><strong>手机专享价格</strong></div></td><!--手机专享价格 app jx -->
    <td scope="col"><div align="center"><strong>{$lang.goods_number}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.goods_attr}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.storage}</strong></div></td>
    <td scope="col"><div align="center"><strong>{$lang.subtotal}</strong></div></td>
  </tr>
  {foreach from=$goods_list item=goods}
  <tr>
    <td>
    {if $goods.goods_id gt 0 && $goods.extension_code neq 'package_buy'}
    <a href="../goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name} {if $goods.brand_name}[ {$goods.brand_name} ]{/if}
    {if $goods.is_gift}{if $goods.goods_price > 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if}
    {if $goods.parent_id > 0}{$lang.remark_fittings}{/if}</a>
    {elseif $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'}
   	<!--修改_start  by www.ecshop68.com -->
    <a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})" style="font-size:15px;color:#ff0000;font-weight:bold;" >{$goods.goods_name}<span style="color:#FF0000;">{$lang.remark_package}</span></a>
    <div id="suit_{$goods.goods_id}" style="padding-left:20px;">
	包括以下商品：<br />
        {foreach from=$goods.package_goods_list item=package_goods_list}
          <a href="../goods.php?id={$package_goods_list.goods_id}" target="_blank">{$package_goods_list.goods_name}</a><br />
        {/foreach}
    </div>
	<!--修改_end  by www.ecshop68.com -->
    {/if}
    </td>
    <td>{$goods.shouhou}</td>
    <td>{$goods.goods_sn}</td>
    <td>{$goods.product_sn}</td>
    <td><div align="right">{$goods.formated_goods_price}</div></td>
	<td><div align="right">{$goods.exclusive}</div></td><!--手机专享价格 app jx -->
    <td><div align="right">{$goods.goods_number}
    </div></td>
    <td>{$goods.goods_attr|nl2br}</td>
    <td><div align="right">{$goods.storage}</div></td>
    <td><div align="right">{$goods.formated_subtotal}</div></td>
  </tr>
  {/foreach}
  <tr>
    <td></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>{if $order.total_weight}<div align="right"><strong>{$lang.label_total_weight}
    </strong></div>{/if}</td>
    <td>{if $order.total_weight}<div align="right">{$order.total_weight}
    </div>{/if}</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><div align="right"><strong>{$lang.label_total}</strong></div></td>
    <td><div align="right">{$order.formated_goods_amount}</div></td>
  </tr>
</table>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
  <tr>
    <th>{$lang.fee_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=money" class="special">{$lang.edit}</a></th>
  </tr>
  <tr>
    <td><div align="right">{$lang.label_goods_amount}<strong>{$order.formated_goods_amount}</strong>
- {$lang.label_discount}<strong>{$order.formated_discount}</strong>     + {$lang.label_tax}<strong>{$order.formated_tax}</strong>
      + {$lang.label_shipping_fee}<strong>{$order.formated_shipping_fee}</strong>
<!--       + {$lang.label_insure_fee}<strong>{$order.formated_insure_fee}</strong> -->
      + {$lang.label_pay_fee}<strong>{$order.formated_pay_fee}</strong>
<!--      + {$lang.label_pack_fee}<strong>{$order.formated_pack_fee}</strong>
      + {$lang.label_card_fee}<strong>{$order.formated_card_fee}</strong>-->
      </div></td>
  <tr>
    <td><div align="right"> = {$lang.label_order_amount}<strong>{$order.formated_total_fee}</strong></div></td>
  </tr>
  <tr>
    <td><div align="right">
      - {$lang.label_money_paid}<strong>{$order.formated_money_paid}</strong> - {$lang.label_surplus} <strong>{$order.formated_surplus}</strong>
      <!--- {$lang.label_integral} <strong>{$order.formated_integral_money}</strong>-->
      - {$lang.label_bonus} <strong>{$order.formated_bonus}</strong>
    </div></td>
  <tr>
    <td><div align="right"> = {if $order.order_amount >= 0}{$lang.label_money_dues}<strong>{$order.formated_order_amount}</strong>
      {else}{$lang.label_money_refund}<strong>{$order.formated_money_refund}</strong>
      <input name="refund" type="button" value="{$lang.refund}" onclick="location.href='order.php?act=process&func=load_refund&anonymous={if $order.user_id <= 0}1{else}0{/if}&order_id={$order.order_id}&refund_amount={$order.money_refund}'" />
      {/if}{if $order.extension_code eq "group_buy"}<br />{$lang.notice_gb_order_amount}{/if}</div></td>
  </tr>
</table>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th colspan="6">{$lang.action_info}</th>
  </tr>
  <tr>
    <td><div align="right"><strong>{$lang.label_action_note}</strong></div></td>
  <td colspan="5"><textarea name="action_note" cols="80" rows="3"></textarea></td>
    </tr>
  <tr>
    <td><div align="right"></div>
      <div align="right"><strong>{$lang.label_operable_act}</strong> </div></td>
	<!-- 一键发货begin 修改 by www.68ecshop.com  -->  
    {if $order.pay_status == 2 && $order.shipping_status != 1 && $order.order_status == 1 }
    <td colspan="2">
    <!-- 如果为预售活动的订单，那么预售活动为成功处理前，不能发货 -->
    <!-- {if $is_pre_sale == 0 || $pre_sale_success == 1} -->
   
	<input type="text" onblur="if(this.value=='') this.value='请输入快递单号';"  onfocus="if(this.value=='请输入快递单号') this.value='';" value="请输入快递单号"   name="invoice_no"  style="color:#00F">    
    <input name="to_shipping" type="submit" style="color:#F00" value="一键发货" class="button" />
    <!-- {/if} -->
    </td>
    <td><div align="right"><strong style="color:#c00">若一键发货请忽略此操作</strong></div></td><td colspan="2">
    {else}
    <td colspan="5">
    {/if}
    <!-- 一键发货end 修改 by www.68ecshop.com -->  
    <!-- 
    op_confirm-{$lang.op_confirm}</br>
    op_pay-{$lang.op_pay}</br>
    op_unpay-{$lang.op_unpay}</br>
    op_prepare-{$lang.op_prepare}</br>
    op_split-{$lang.op_split}</br>
    op_unship-{$lang.op_unship}</br>
    op_receive-{$lang.op_receive}</br>
    op_cancel-{$lang.op_cancel}</br>
    op_invalid-{$lang.op_invalid}</br>
     -->
    {if $operable_list.confirm}
      <input name="confirm" type="submit" value="{$lang.op_confirm}" class="button" />
        {/if} {if $operable_list.pay}
        <input name="pay" type="submit" value="{$lang.op_pay}" class="button" />
        {/if} {if $operable_list.unpay}
        <input name="unpay" type="submit" class="button" value="{$lang.op_unpay}" />
        {/if} {if $operable_list.prepare && ($is_pre_sale == 0 || $pre_sale_success == 1)}
        <input name="prepare" type="submit" value="{$lang.op_prepare}" class="button" />
        {/if} {if $operable_list.split && ($is_pre_sale == 0 || $pre_sale_success == 1)}
        <input name="ship" type="submit" value="{$lang.op_split}" class="button" />
        {/if} {if $operable_list.unship}
        <input name="unship" type="submit" value="{$lang.op_unship}" class="button" />
        {/if} {if $operable_list.receive}
        <input name="receive" type="submit" value="{$lang.op_receive}" class="button" />
        {/if} {if $operable_list.cancel}
        <input name="cancel" type="submit" value="{$lang.op_cancel}" class="button" />
        {/if} {if $operable_list.invalid}
        <input name="invalid" type="submit" value="{$lang.op_invalid}" class="button" />
        {/if} {if $operable_list.return}
        {* 代码修改_start  By  www.68ecshop.com *}
		<!--
        <input name="return" type="submit" value="{$lang.op_return}" class="button" />
		-->
		{* 代码修改_end  By  www.68ecshop.com *}
        {/if} {if $operable_list.to_delivery}
        <input name="to_delivery" type="submit" value="{$lang.op_to_delivery}" class="button"/>
        <input name="order_sn" type="hidden" value="{$order.order_sn}" />
        {/if} <input name="after_service" type="submit" value="{$lang.op_after_service}" class="button" />{if $operable_list.remove}
        <input name="remove" type="submit" value="{$lang.remove}" class="button" onClick="return window.confirm('{$lang.js_languages.remove_confirm}');" />
        {/if}
        {if $order.extension_code eq "group_buy"}{$lang.notice_gb_ship}{/if}
        {if $order.extension_code eq "pre_sale"}{$lang.notice_ps_ship}{/if}
        {if $agency_list}
        <input name="assign" type="submit" value="{$lang.op_assign}" class="button" onclick="return assignTo(document.forms['theForm'].elements['agency_id'].value)" />
        <select name="agency_id"><option value="0">{$lang.select_please}</option>
        {foreach from=$agency_list item=agency}
        <option value="{$agency.agency_id}" {if $agency.agency_id eq $order.agency_id}selected{/if}>{$agency.agency_name}</option>
        {/foreach}
        </select>
        {/if}
        <input name="order_id" type="hidden" value="{$smarty.request.order_id}"></td>
    </tr>
  <tr>
    <th>{$lang.action_user}</th>
    <th>{$lang.action_time}</th>
    <th>{$lang.order_status}</th>
    <th>{$lang.pay_status}</th>
    <th>{$lang.shipping_status}</th>
    <th>{$lang.action_note}</th>
  </tr>
  {foreach from=$action_list item=action}
  <tr>
    <td><div align="center">{$action.action_user}</div></td>
    <td><div align="center">{$action.action_time}</div></td>
    <td><div align="center">{$action.order_status}</div></td>
    <td><div align="center">{$action.pay_status}</div></td>
    <td><div align="center">{$action.shipping_status}</div></td>
    <td>{$action.action_note|nl2br}</td>
  </tr>
  {/foreach}
</table>
</div>
<div class="list-div" style="margin-bottom: 5px">
<!-- {if $order.invoices and $order.shipping_name neq '门店自提'} -->
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
 <tr>
    <th align="center">物流跟踪</th>
  </tr>
  <tr>
    <td bgcolor="#ffffff">
		<ul id='ul_i' class="rec-nav">
		{foreach from=$order.invoices name=name_i item=invoice_info}
			<li id="div_i_{$smarty.foreach.name_i.iteration}"><a href='javascript:;' onclick="get_invoice_info('{$invoice_info.shipping_name}','{$invoice_info.invoice_no}','{$smarty.foreach.name_i.iteration}')">物流{$smarty.foreach.name_i.iteration}</a></li>
		{/foreach}
		</ul>
		<div id="retData"></div>
	</td>
  </tr>
</table>
<!-- {/if} -->
</div>
</form>
{literal}
<script language="JavaScript">
{/literal}
  var oldAgencyId = {$order.agency_id|default:0};
{literal}
  onload = function()
  {
    // 开始检查订单
    startCheckOrder();
  }

  /**
   * 把订单指派给某办事处
   * @param int agencyId
   */
  function assignTo(agencyId)
  {
    if (agencyId == 0)
    {
      alert(pls_select_agency);
      return false;
    }
    if (oldAgencyId != 0 && agencyId == oldAgencyId)
    {
      alert(pls_select_other_agency);
      return false;
    }
    return true;
  }
</script>
<script language="javascript">
get_invoice_info('{$order.invoices.0.shipping_name}','{$order.invoices.0.invoice_no}',1);

function get_invoice_info(expressid,expressno,div_id)
{
	$("#ul_i").children("li").removeClass();
	document.getElementById("div_i_"+div_id).className = 'selected';
	
	if (expressid == "同城快递")
	{
		Ajax.call(
			'order.php?act=get_tc_express', 
			'expressno =' + expressno, 
			function(data){
				document.getElementById("retData").innerHTML='快递公司：'+expressid+' &nbsp; 运单号：'+expressno+'<br>';
				document.getElementById("retData").innerHTML+=data;
			}, 
			'POST', 
			'JSON',
			false
		);
	}
	else
	{
		Ajax.call(
			'../plugins/kuaidi100/kuaidi100_post.php?com='+ expressid+'&nu=' + expressno, 
			'showtest=showtest', 
			function(data){
				document.getElementById("retData").innerHTML='快递公司：'+expressid+' &nbsp; 运单号：'+expressno+'<br>';
				document.getElementById("retData").innerHTML+=data;
			}, 
			'GET', 
			'TEXT', 
			false
		);
	}
}
</script>
{/literal}

{include file="pagefooter.htm"}